using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using Castle.ActiveRecord;
using Castle.ActiveRecord.Queries;


#region 'T_DESC_MS' Schema
/*
 * 'TDescMs' class maps to 'T_DESC_MS' table.
 * 	 I_CLS_CD                | Type:VARCHAR2  | Len:3     | Nullable:F | PK:T | FK:F
 * 	 I_NAME_CD               | Type:VARCHAR2  | Len:6     | Nullable:F | PK:T | FK:F
 * 	 I_LANGUAGE_CD           | Type:VARCHAR2  | Len:6     | Nullable:F | PK:T | FK:F
 * 	 I_NAME_DESC             | Type:VARCHAR2  | Len:32    | Nullable:T | PK:F | FK:F
 * 	 I_NAME_KANA             | Type:VARCHAR2  | Len:32    | Nullable:T | PK:F | FK:F
 * 	 I_INQ_ITEM              | Type:VARCHAR2  | Len:1     | Nullable:T | PK:F | FK:F
 * 	 I_ENTRY_DATE            | Type:DATE      | Len:0     | Nullable:F | PK:F | FK:F
 * 	 I_UPD_DATE              | Type:DATE      | Len:0     | Nullable:F | PK:F | FK:F
 * 	 I_UPD_TIMESTAMP         | Type:VARCHAR2  | Len:17    | Nullable:F | PK:F | FK:F
 */
#endregion
/// <summary>
///	Generated by MyGeneration using the ActiveRecord Object Mapper - 1.0.2
///	Created on 2011/9/6 21:54:54
/// </summary>
namespace Com.GainWinSoft.ERP.Entity
{
	[Serializable , ActiveRecord("T_DESC_MS")]
	public class TDescMs : ActiveRecordBase	{

		#region Private Members


        private TDescMsId id;



		private string iNameDesc; 
		private string iNameKana; 
		private string iInqItem; 
		private DateTime iEntryDate; 
		private DateTime iUpdDate; 
		private string iUpdTimestamp; 
		
		#endregion

		#region Constuctor(s)

        public TDescMs()
        {
            id = new TDescMsId();
            iNameDesc = String.Empty;
            iNameKana = String.Empty;
            iInqItem = String.Empty;
            iEntryDate = DateTime.MinValue;
            iUpdDate = DateTime.MinValue;
            iUpdTimestamp = String.Empty;

        }

        //public TDescMs(
        //    string i_cls_cd, 
        //    string i_name_cd, 
        //    string i_language_cd, 
        //    DateTime i_entry_date, 
        //    DateTime i_upd_date, 
        //    string i_upd_timestamp)
        //    : this()
        //{
        //    iClsCd = i_cls_cd;
        //    iNameCd = i_name_cd;
        //    iLanguageCd = i_language_cd;
        //    iNameDesc = String.Empty;
        //    iNameKana = String.Empty;
        //    iInqItem = String.Empty;
        //    iEntryDate = i_entry_date;
        //    iUpdDate = i_upd_date;
        //    iUpdTimestamp = i_upd_timestamp;
        //}

		#endregion // End of Class Constuctor(s)
		
		#region Public Properties
			
        //[PrimaryKey(PrimaryKeyType.Identity ,"I_CLS_CD", Length=3)]
        //public virtual string IClsCd
        //{
        //    get { return iClsCd; }
        //    set { iClsCd = value; }
        //}

        //[PrimaryKey(PrimaryKeyType.Identity ,"I_NAME_CD", Length=6)]
        //public virtual string INameCd
        //{
        //    get { return iNameCd; }
        //    set { iNameCd = value; }
        //}

        //[PrimaryKey(PrimaryKeyType.Identity ,"I_LANGUAGE_CD", Length=6)]
        //public virtual string ILanguageCd
        //{
        //    get { return iLanguageCd; }
        //    set { iLanguageCd = value; }
        //}

        [CompositeKey]
        public TDescMsId Id
        {
            get { return id; }
            set { id = value; }
        }

		[Property(Column="I_NAME_DESC", Length=32)]
		public virtual string INameDesc
		{
			get { return iNameDesc; }
			set { iNameDesc = value; }
		}

		[Property(Column="I_NAME_KANA", Length=32)]
		public virtual string INameKana
		{
			get { return iNameKana; }
			set { iNameKana = value; }
		}

		[Property(Column="I_INQ_ITEM", Length=1)]
		public virtual string IInqItem
		{
			get { return iInqItem; }
			set { iInqItem = value; }
		}

		[Property(Column="I_ENTRY_DATE", NotNull=true)]
		public virtual DateTime IEntryDate
		{
			get { return iEntryDate; }
			set { iEntryDate = value; }
		}

		[Property(Column="I_UPD_DATE", NotNull=true)]
		public virtual DateTime IUpdDate
		{
			get { return iUpdDate; }
			set { iUpdDate = value; }
		}

		[Property(Column="I_UPD_TIMESTAMP", NotNull=true, Length=17)]
		public virtual string IUpdTimestamp
		{
			get { return iUpdTimestamp; }
			set { iUpdTimestamp = value; }
		}


		#endregion 

			
		#region Equals, HashCode and ToString overrides
		
		/// <summary>
		/// Local implementation of Equals based on unique value members
		/// </summary>
		public override bool Equals( object obj )
		{
			if( this == obj ) return true;
			if( ( obj == null ) || ( obj.GetType() != this.GetType() ) ) return false;
			TDescMs castObj = (TDescMs)obj; 
			return ( castObj != null ) &&
				( this.id == castObj.id );
		}
		
		/// <summary>
		/// Local implementation of GetHashCode based on unique value members
		/// </summary>
		public override int GetHashCode()
		{
			
			int hash = 57; 
			hash = 27 * hash * id.GetHashCode();
			return hash; 
		}
		
		/// <summary>
		/// Local implementation of ToString based on class members
		/// </summary>
		public override String ToString()
        {
            StringBuilder sbuffer = new StringBuilder();
			sbuffer.Append("{");
			
			sbuffer.AppendFormat("IClsCd = {0}, ",id.IClsCd);
			sbuffer.AppendFormat("INameCd = {0}, ",id.INameCd);
			sbuffer.AppendFormat("ILanguageCd = {0}, ",id.ILanguageCd);
			sbuffer.AppendFormat("INameDesc = {0}, ",iNameDesc);
			sbuffer.AppendFormat("INameKana = {0}, ",iNameKana);
			sbuffer.AppendFormat("IInqItem = {0}, ",iInqItem);
			sbuffer.AppendFormat("IEntryDate = {0}, ",iEntryDate);
			sbuffer.AppendFormat("IUpdDate = {0}, ",iUpdDate);
			sbuffer.AppendFormat("IUpdTimestamp = {0}, ",iUpdTimestamp);
			sbuffer.Append(" }");
			return sbuffer.ToString();
        }
		
		#endregion
	}
}
